<h1>Igre</h1>

<table cellspacing="0" class="list">
	<tr>
		<th>Id</th>
		<th>Ime</th>
		<th class="actions"><a href="#games/edit/" onclick="adminContent('{#root#}/admin_games/edit')">nova igra</a></th>
	</tr>
	{if $games|@count}
		{foreach from=$games item=game key=k name=gameslist}
		<tr class="{if $smarty.foreach.gameslist.index%2}even{else}odd{/if}">
			<td>{$game.id}</td>
			<td><a href="#games/edit/{$game.id}" onclick="adminContent('{#root#}/admin_games/edit/{$game.id}')">{$game.name}</a></td>
			<td class="actions">
				<a href="#games/edit/{$game.id}" onclick="adminContent('{#root#}/admin_games/edit/{$game.id}')">izmeni</a>
				<a href="javascript:void(0)" onclick="if(confirm('Da li želite da obrišete igru?'))adminContent('{#root#}/admin_games/delete/{$game.id}')">obriši</a>
			</td>
		</tr>
		{/foreach}
	{else}
		<tr>
			<td colspan="3">Nema igara.</td>
		</tr>
	{/if}
</table>